import request from '@/utils/request'

// 查询异动计划补录列表
export function listOrder(query) {
  return request({
    url: '/platform/order/list',
    method: 'get',
    params: query
  })
}

export function waitToDoListOrder(query) {
  return request({
    url:'/platform/order/list/waitToDo',
    method: 'get',
    params: query
  })
}

// selectCompletedList

export function completedListOrder(query) {
  return request({
    url:'/platform/order/list/completed',
    method: 'get',
    params: query
  })
}

// document
export function documentListOrder(query) {
  return request({
    url:'/platform/order/list/document',
    method: 'get',
    params: query
  })
}

// 查询异动计划补录详细
export function getOrder(id) {
  return request({
    url: '/platform/order/' + id,
    method: 'get'
  })
}

// 新增异动计划补录
export function addOrder(data) {
  return request({
    url: '/platform/order',
    method: 'post',
    data: data
  })
}

// 修改异动计划补录
export function updateOrder(data) {
  return request({
    url: '/platform/order',
    method: 'put',
    data: data
  })
}

// 删除异动计划补录
export function delOrder(id) {
  return request({
    url: '/platform/order/' + id,
    method: 'delete'
  })
}


// 流程工单审核
export function reviewOrder(data) {
  return request({
    url: '/platform/order/review',
    method: 'put',
    data
  })
}

// 流程工单审核回退
export function reviewBackOrder(data) {
  return request({
    url: '/platform/order/reviewBack',
    method: 'put',
    data
  })
}

// 流程工单终止
export function processReviewStopOrder(data) {
  return request({
    url: '/platform/order/reviewStop',
    method: 'put',
    data
  })
}

// 流程工单审批
export function approveOrder(data) {
  return request({
    url: '/platform/order/approve',
    method: 'put',
    data
  })
}

// 流程工单审批回退
export function approveBackOrder(data) {
  return request({
    url: '/platform/order/approveBack',
    method: 'put',
    data
  })
}

// 流程工单终止
export function processApproveStopOrder(data) {
  return request({
    url: '/platform/order/approveStop',
    method: 'put',
    data
  })
}

// 流程工单归档
export function processDocumentOrder(data) {
  return request({
    url: '/platform/order/processDocument',
    method: 'put',
    data
  })
}

